package com.catazzz.springbootstudy.common.exception;

import lombok.Getter;

/**
 * @作者: Tao
 * @日期: 2025/1/2
 * @时间: 14:00
 * @描述: 错误信息枚举类 <br><pre>
 */
@Getter
public enum MessageEnum {

    ERROR(500, "系统错误"),
    SUCCESS(200, "成功"),
    FAIL(400, "失败"),
    NOT_FOUND(404, "未找到"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_ACCEPTABLE(406, "请求格式错误"),
    METHOD_NOT_ALLOWED(405, "请求方法不允许"),
    REQUEST_TIMEOUT(408, "请求超时"),
    REQUEST_ENTITY_TOO_LARGE(413, "请求实体过大"),
    REQUEST_URI_TOO_LONG(414, "请求URI过长");

    private final Integer code;
    private final String message;

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
